<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>ToDoList</title>
    <link rel="stylesheet" href="./index.css">
    <script src="./vue.global.js"></script>
</head>
<body>
    <div id="app">
        <div class="head">
            <div class="head-box">
                <h2>ToDoList</h2>
                <input @:submit="add()" type="text" placeholder="添加ToDo">
            </div>
        </div>
        <!-- 正在完成列表 -->
        <div class="list-head">
            <h2>正在完成</h2>
            <div class="count">0</div>
        </div>
        <ul class="list">
        </ul>
        <!-- 已经完成列表 -->
        <div class="list-head">
            <h2>正在完成</h2>
            <div class="count">0</div>
        </div>
        <ul class="list">
        </ul>
    </div>
    
<script>
    let todo_list = [];
    const app = Vue.createApp({
        data(){
            return{
                todo_list
            }
        },
        add(todo){
            console.log("add");
            // todo_list.push(todo)
        }
    })
    app.mount("body")
</script>
</body>

</html>